home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX 6.2 Applications 1996 May
/
SGI IRIX 6.2 Applications 1996 May.iso
/
dist
/
impr_dev.idb
/
usr
/
impressario
/
src
/
examples
/
libpod
/
message.c.z
/
message.c
Wrap
C/C++ Source or Header
|
1996-05-06
|
2KB
|
77 lines
/**************************************************************************
*
* Copyright (c) 1992 Silicon Graphics, Inc.
* All Rights Reserved
*
* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF SGI
*
* The copyright notice above does not evidence any actual of intended
* publication of such source code, and is an unpublished work by Silicon
* Graphics, Inc. This material contains CONFIDENTIAL INFORMATION that is
* the property of Silicon Graphics, Inc. Any use, duplication or
* disclosure not specifically authorized by Silicon Graphics is strictly
* prohibited.
*
* RESTRICTED RIGHTS LEGEND:
*
* Use, duplication or disclosure by the Government is subject to
* restrictions as set forth in subdivision (c)(1)(ii) of the Rights in
* Technical Data and Computer Software clause at DFARS 52.227-7013,
* and/or in similar or successor clauses in the FAR, DOD or NASA FAR
* Supplement. Unpublished - rights reserved under the Copyright Laws of
* the United States. Contractor is SILICON GRAPHICS, INC., 2011 N.
* Shoreline Blvd., Mountain View, CA 94039-7311
**************************************************************************
*
* File: message.c
*
* Description: Simply demonstrates how to use the PDMakeMessage function.
* The program does not perform any useful work as far as interacting
* with POD files.
*
**************************************************************************/
#ident "$Revision: 1.1 $"
#include <stdio.h>
#include <stdlib.h>
#include <pod.h>
/* ARGSUSED */
int main(int argc, char **argv)
{
PDMessageStruct msg[2];
register int i;
/*
* Construct a warning message
*/
if (PDMakeMessage(&msg[0], PD_WARN_REQ_PAPER) < 0) {
PDPerror(argv[0]);
exit(1);
}
/*
* Construct an error message
*/
if (PDMakeMessage(&msg[1], PD_ERROR_WARMING_UP) < 0) {
PDPerror(argv[0]);
exit(1);
}
/*
* Print the message list
*/
for (i = 0; i < 2; i++) {
(void)printf("For message code: 0x%08X\n", msg[i].message_code);
(void)printf("Returned Std. Message: %s\n", msg[i].message_text);
(void)printf("\n");
}
return 0;
}